package com.baizhi.tests;

import com.baizhi.dao.TitleDAO;
import com.baizhi.dao.TitleDAOImpl;
import com.baizhi.entity.Title;
import org.junit.Test;
import java.util.List;

public class TestTitle {
    private TitleDAO td = new TitleDAOImpl();
    private Title title = new Title();
    @Test
    public void testitle(){
        Title titlees = new Title();
        titlees.setName("宋北晨");
        List<Title> titles = td.queryMyTitle(titlees);
        System.out.println(titles);
    }
    @Test
    public void update(){
        title.setTitle("哈哈哈");
        title.setText("啊哈哈哈woji");
        title.setDate("01/02  2021");
        title.setKeyWord("哈啊哈");
        td.update(title);
    }
    @Test
    public void delect(){
        title.setTitle("哈哈哈");
        td.delete(title);
    }
}
